package day5;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Zhishu {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入一个数");
        int count = in.nextInt();
        boolean aaa = false;
        //int k= (int) Math.sqrt(count);

        for (int i = 2,k= (int) Math.sqrt(count); i <= k; i++) {
            if(count % i == 0){
                aaa = true;
                break;
            }
        }
        if (!aaa){
            System.out.println("是质数");
        }else {
            System.out.println("不是质数");
        }
    }
}
